package com.example.controller;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.fastjson.JSONObject;


@SpringBootApplication
@Controller
public class AIndexController {
	
	@RequestMapping("/aIndex")
	public String aIndexJsp() {
		System.out.println("执行成功...");
		return "aIndex";
	}
	
	@RequestMapping("/forwardB")
	@ResponseBody
	public JSONObject forwardB() {
		JSONObject httpGet = HttpClientUtils.httpGet("http://b.web.com:8081/getBInfo");
		return httpGet;
	}

	public static void main(String[] args) {
		SpringApplication.run(AIndexController.class, args);
	}
	
}
